package com.zy.service;

import com.zy.pojo.Department;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: xiaoqi
 * Date: 2021/5/31
 * Time: 下午 16:30
 * Description: 部门服务层接口
 */
public interface DepartmentService {

    /**
     * 添加部门
     *
     * @param department
     * @return
     */
    Boolean insertDepartment(Department department);

    /**
     * 删除部门 能够删除的前提是 该部门没有员工
     *
     * @param id
     * @return
     */
    Boolean deleteDepartmentById(Integer id);

    /**
     * 更新部门
     *
     * @param department
     * @return
     */
    Boolean updateDepartment(Department department);

    /**
     * 获取所有部门
     *
     * @return
     * @param page
     * @param limit
     */
    List<Department> getDepartmentList(Integer page, Integer limit);

    /**
     * 根据id获取部门
     *
     * @param id
     * @return
     */
    Department getDepartmentById(Integer id);


    Integer getDepartmentCount();
}
